from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',

    url(r'^addserver/', 'list.views.register', name='addserver'),
    url(r'^delserver/', 'list.views.unregister', name='delserver'), 
    url(r'^renew/', 'list.views.renew', name='renserver'), 
    url(r'^start.jnlp$', 'list.views.startnew', name='startserver'), 
    url(r'^start/(?P<name>.+).jnlp$', 'list.views.startnewafter', name='startserver'), 

    (r'^accounts/', include('registration.urls')),
    # url(r'^login/$', 'django.contrib.auth.views.login'),
    # Examples:
    # url(r'^$', 'hakanspirates.views.home', name='home'),
    # url(r'^hakanspirates/', include('hakanspirates.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    url(r'^$', 'list.views.index', name='home'),
    url(r'^load/(?P<serverid>\d+).jnlp$', 'list.views.load'),
    url(r'^load/(?P<serverid>\d+)/(?P<name>.+).jnlp$', 'list.views.loadafter'),

    # Uncomment the next line to enable the admin:
     url(r'^admin/', include(admin.site.urls)),
)
